package com.weipai.springboot.module.dao;

import com.weipai.springboot.model.Artisan;
import com.weipai.springboot.model.ArtisanEarings;
import com.weipai.springboot.model.Customer;

import java.util.List;
import java.util.Map;

/**
 * @Author: 曹朋飞
 * @Date: 2018/08/28 10:36
 */
public interface ArtisanDao {
    int insert(Artisan artisan);

    List<Map<String, Object>> selectAllByDel(int del, String search, String sort, String way, String isAudit,String demandCategoryId);

    Artisan getArtisanById(String id);

    int updateDel(String id);

    int batchDeleteById(String[] id);

    int updateStatus(String id, Integer status);

    int updateByPrimaryKey(Artisan artisan);

    //首页推荐技工
    List<Map<String,Object>> recommendArtisan(String city);

    //根据用户id查询技工信息
    Artisan getArtisanByCustomerId(String customerId);

    Artisan getArtisanByMobile(String mobile);

    int changeIsAudit(String id, Integer isAudit);

    int saveArtisanEarings(ArtisanEarings earings);

    List<Map<String,Object>> getArtisanEaringsByArtisanId(String artisanId, Integer start, Integer size, String startTime, String endTime);

    Integer getArtisanEaringsByArtisanIdAmount(String artisanId, String startTime, String endTime);

    Integer getArtisanMoney(String artisanId, String startTime, String endTime);

    List<Map<String, Object>> getCanCashMoney();

    int updateStatus();

    List<Map<String,Object>> getMyIncomesList(String artisanId);
}
